package PackageGeometry;

public class Cylinder extends Geometry{

    private Geometry a;
    private double h;

    public Cylinder() {
    }

    public Cylinder(Geometry a, double h) {
        this.a = a;
        this.h = h;
    }


    @Override
    public double calculateArea() {
        return a.calculateArea() + a.calculateArea() + a.calculateCircumference() * h;
    }

    @Override
    public double calculateCircumference() {
        return 0;
    }

    @Override
    public void draw() {
    }

    /**
     * 获取
     * @return a
     */
    public Geometry getA() {
        return a;
    }

    /**
     * 设置
     * @param a
     */
    public void setA(Geometry a) {
        this.a = a;
    }

    /**
     * 获取
     * @return h
     */
    public double getH() {
        return h;
    }

    /**
     * 设置
     * @param h
     */
    public void setH(double h) {
        this.h = h;
    }


}
